<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <title></title>
        <meta charset="utf-8">
        <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <link rel="stylesheet" href="css/fonts/font-awesome.min.css">
        <link rel="stylesheet" href="css/ui-box.css">
        <link rel="stylesheet" href="css/ui-base.css">
        <link rel="stylesheet" href="css/ui-color.css">
        <link rel="stylesheet" href="css/appcan.icon.css">
        <link rel="stylesheet" href="css/appcan.control.css">
        <link rel="stylesheet" type="text/css" href="./css/kaoshiDemo.css">
    </head>
    <body class="um-vp " ontouchstart>
        <div id="page_0" class="up ub ub-ver bc-bg" tabindex="0">
            <!--header开始-->
            <div id="header" class="uh bc-tesxt-head ub bc-head" style="background:#383C59;color:#ffffff">
                <div class="nav-btn" id="nav-left">
                    <div class="fa fa-angle-left fa-2x"></div>
                </div>
                <h1 class="ut ub-f1 ulev-3 ut-s tx-c" tabindex="0">在线考试</h1>
                <div class="nav-btn nav-bt" id="nav-right"></div>
            </div>
            <div class="time_title ub ub-ac ub-pe">
                <div class="time">
                                             距离考试结束还有<i class="min"></i>分<i class="sec"></i>秒
                </div> 
            </div>
        <!--这里是题目的标题-->
            <!--header结束--><!--content开始-->
            <div  id="kaosDemo_content" class="ub-f1 tx-l" >
            </div>
            <!--content结束-->
            <div class="myfoote" >
                <div  id="submi">
                  提交考卷
               </div>

            </div>
        </div>
        <script src="js/appcan.js"></script>
        <script src="js/appcan.control.js"></script>
        <script src="js/saveExamResult.js"></script>
        <script src="js/index.js"></script>
        <script src="js/submitPaper.js"></script>
        <script src="js/talkingdata.js"></script>
        <script type="text/javascript" charset="utf-8">
        appcan.ready(function() {

            var top1=$('#header').offset().height;
            var top2=$(".time_title").offset().height;
            var titHeight = top2+top1;
            IC.talkingDataCount("培训考试","00010");
            
            appcan.frame.open("kaosDemo_content", "kaosDemo_content.html",0, titHeight);
            window.onorientationchange = window.onresize = function() {
                appcan.frame.resize("kaosDemo_content", 0, titHeight);
            }
        });
        
        //var data={};
        var data=JSON.parse(appcan.locStorage.getVal("dataLIst"));

        $("#nav-left").on('click',function(){

            //获取缓存
            var c=appcan.locStorage.getVal("c");

           uexWindow.publishChannelNotification('fenshu_content','search()');
            uexWindow.evaluateScript("kaosDemo", "0", "appcan.window.close(-1)");
            //获取当前考试Id
            var examId=appcan.locStorage.getVal("examId");
            //当前考题的 索引
            var index=appcan.locStorage.getVal("index");
           // //将时间保存到本地
            var min=Number($(".min").html());
            var sec=Number($(".sec").html());
            var dataLIst={"min":min,"sec":sec,"index":index};
            if(c!=1){
                if(data !=""&&data !=null&&data !=undefined && data !="undefined" && JSON.stringify(data)!="{}"){
                data[examId]=dataLIst;
            }else{
                    data={};
                  data[examId]=dataLIst;
            }
            //将数组缓存到本地
            var res=JSON.stringify(data);
            appcan.locStorage.setVal("dataLIst",data);
            }
            
        });

        </script>
        
        
    </body>
    
</html>